class Solution(object):
    def combine(self, n, k):
        """
        :type n: int
        :type k: int
        :rtype: List[List[int]]
        """
        out = []
        already_list = []
        max_value = n

        def add_element(already_list, now_value, left_num):
            if left_num == 0:
                out.append(already_list)
            else:
                for i in range(now_value + 1, max_value + 1):
                    if max_value - i + 1 >= left_num:
                        new_already_list = already_list.copy()
                        new_already_list.append(i)
                        add_element(new_already_list, i, left_num - 1)
        add_element(already_list, 0, k)
        return out


data = Solution()
n = 1
k = 1
print(data.combine(n, k))
